import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import locale from 'element-plus/lib/locale/lang/zh-cn'
import * as ELIcons from '@element-plus/icons-vue'
import '@/assets/css/base.scss'
import router from '@/router/index'
import '@/router/power'
import App from './App.vue'

const app = createApp(App)

// 使用大菠萝状态管理器
app.use(createPinia())
app.use(ElementPlus, { locale })
app.use(router)

// 批量注册图标，不想一个个注册了
for (let iconName in ELIcons) {
    app.component(iconName, ELIcons[iconName])
}
app.mount('#app')
